<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>日期对象</title>
	<script type="text/javascript">

		// var date1 = "2018-01-01";
		// // 所有日期都有对应一个秒数

		// var date2 = "2017-10-26";

		// var date = date1-date2;

		// alert(date);
		// 
		var now = new Date();
		// 获得当前时间对象
		var yundan = new Date('2018-01-01 0:0:0');

		var birthday = new Date("1986-11-24");


		console.log(birthday.getDay());

		console.log((now.getTime()/1000-birthday.getTime()/1000)/86400);

		console.log(yundan.getTime()/1000);
		
		console.log(birthday.getTime()/1000);






	</script>
</head>
<body>
	
</body>
</html>